package com.fanyouzhao.eshop.core.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;

/**
 * 轮播图实体类
 * @author: fanyouzhao
 * @date: 14:45 2021/6/30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(collection = "bannerList")
@ApiModel("轮播广告Banner实体类")
public class Banner implements Serializable {

    @ApiModelProperty("id主键")
    @Field("id")
    private String id;

    @Field("title")
    @ApiModelProperty("标题")
    private String title;

    @Field("image")
    @ApiModelProperty("图片地址")
    private String image;

    @Field("url")
    @ApiModelProperty("超链接地址")
    private String url;

    @Field("position")
    @ApiModelProperty("播放位置")
    private String position;

    // 首页
    public static final String HOME="home";
    // 家电子页面
    public static final String JD="jiadian";
    // 手机子页面
    public static final String SJ="shouji";


    @Field("creatTime")
    @ApiModelProperty("创建时间")
    private Date creatTime;


}
